﻿using System;
using SourceGrid;
using SourceGrid.Cells.Controllers;

namespace ZeBobo5.LibraryHelper.Core.Grid.Controllers
{
    public class DoubleClickController : ControllerBase
    {
        public static readonly DoubleClickController Default = new DoubleClickController();

        public override void OnDoubleClick(CellContext sender, EventArgs e)
        {
            if (sender.Grid is IDoubleControllerEvent)
            {
                ((IDoubleControllerEvent) sender.Grid).OnDoubleClickCellEvent(sender);
            }
            base.OnDoubleClick(sender, e);
        }
    }
}